<?php
class Authentication{
	public function authenticate(){
	//$preUrl = 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
		$preUrl = $_SERVER['PATH_INFO'];
		$this->session->set_userdata('preUrl',$preUrl);
		if($this->User_model->is_logged_in() != TRUE){
			redirect('login');
		}
	}
}